import axios from '../axios.js';

const subjects = {
    // 请求专业列表数据
    getSubjects(params) {
        return axios({
            url: '/subjects/getSubjects',
            method: 'GET',
            params,
        })
    },
    // 增加一个专业
    addOneSubjects(data) {
        return axios({
            url: '/subjects/addSubjects',
            method: 'POST',
            data,
        })
    },
    // 删除一个专业
    deleteOneSubject(data) {
        return axios({
            url:'/subjects/deleteSubjects',
            method:'DELETE',
            data,
        })
    },
    // 修改一个专业
    updateOneSubject(data){
        return axios({
            url:'/subjects/updateSubjects',
            method:'PUT',
            data,
        })
    },
}
export default subjects;